package com.hmy.pig.controller;

import com.hmy.pig.domain.SmbmsBill;
import com.hmy.pig.mapper.SmbmsBillMapper;
import com.hmy.pig.service.SmbmsBillService;
import com.ruoyi.common.core.web.domain.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class BillController {


    @Autowired
    private SmbmsBillService billService;

    @RequestMapping("find")
    public AjaxResult findBillList(){
        return AjaxResult.success(billService.listBill());
    }
    @RequestMapping("add")
    public AjaxResult addBill(){
        SmbmsBill bill = new SmbmsBill();
        bill.setBillCode("yyh");
        return AjaxResult.success(billService.insert(bill));
    }
}
